package com.cisetech.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cisetech.mapper.bobocai.LCustomerMapper;
import com.cisetech.service.CusTomerService;
import com.cisetech.vo.bobocai.LCustomer;

@Service
public class CusTomerServiceImpl implements CusTomerService{

	
	static Logger logger = LoggerFactory.getLogger(CusTomerServiceImpl.class);

	@Autowired
	LCustomerMapper customerMapper;
	
	
	@Override
	public List<LCustomer> findList(LCustomer user) {
		List<LCustomer> list = new ArrayList<LCustomer>();
		try {
			list = customerMapper.findList(user);
		} catch (Exception e) {
			logger.debug(e.getLocalizedMessage());
			return list;
		}
		if(user!=null){
			return list;
		}
		return list;
	}


	@Override
	public int insert(LCustomer customer) {
		// TODO Auto-generated method stub
		return customerMapper.insert(customer);
	}


	@Override
	public int updateByEmailtoType(LCustomer customer) {
		// TODO Auto-generated method stub
		return customerMapper.updateByEmailtoType(customer);
	}


	@Override
	public int updateByPrimaryKeySelective(LCustomer customer) {
		// TODO Auto-generated method stub
		return customerMapper.updateByPrimaryKeySelective(customer);
		
	}

}
